package com.stars.home.activity

import android.os.Bundle
import com.hwangjr.rxbus.annotation.Subscribe
import com.hwangjr.rxbus.annotation.Tag
import com.stars.home.base.MBActivity
import com.stars.home.config.ConfigRx
import com.stars.home.databinding.ActivitySurplusBinding
import com.stars.home.vmodel.SurplusVModel

/**
 *on 2022/9/23
 */
class SurplusActivity: MBActivity<SurplusVModel, ActivitySurplusBinding>() {

    override fun init(savedInstanceState: Bundle?) {
        super.init(savedInstanceState)
        vm.getUserInfo()
    }

    override fun vmClass(): Class<SurplusVModel> {
        return SurplusVModel::class.java
    }
    override fun binding(): ActivitySurplusBinding {
        return ActivitySurplusBinding.inflate(layoutInflater)
    }

    override fun title(): String? {
        return  "余额"
    }

    override val isRxbus: Boolean
        get() =true

    @Subscribe(tags = [Tag(ConfigRx.REFRESH_USER)])
    fun setRefreshUser(type: String) {
        //刷新
        vm.getUserInfo()
    }
}
